Advertisement
Sungmingamerpro13

Images

May 20th, 2024
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.66 KB | None | 0 0
  1. local PlayerImage = game.ReplicatedStorage:FindFirstChild("PlayerImage")
  2. local NPCImage = game.ReplicatedStorage:FindFirstChild("NPCImage") -- the RemoteEvent in ReplicatedStorage called "NPCImage"
  3. local Players = game:GetService("Players")
  4. local ThumbnailType = Enum.ThumbnailType.HeadShot
  5. local ThumbnailSize = Enum.ThumbnailSize.Size150x150
  6.  
  7. PlayerImage.OnClientEvent:Connect(function(RandomPlayer)
  8.     script.Parent.Image = Players:GetUserThumbnailAsync(RandomPlayer.userId, ThumbnailType, ThumbnailSize)
  9. end)
  10.  
  11. NPCImage.OnClientEvent:Connect(function(NPCImage)
  12.     script.Parent.Image = "http://www.roblox.com/asset/?id=0" -- Replace "0" with your Decal ID
  13. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement